package org.blame.rabbitmqspringboot.listener;

import org.blame.rabbitmqspringboot.constants.Constants;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class DirectListener {
    @RabbitListener(queues = Constants.DIRECT_QUEUE1)
    public void directQueueListener1(String message){
        System.out.println("监听的队列"+Constants.DIRECT_QUEUE1+"收到的消息"+message);
    }

    @RabbitListener(queues = Constants.DIRECT_QUEUE2)
    public void directQueueListener2(String message){
        System.out.println("监听的队列"+Constants.DIRECT_QUEUE2+"收到的消息"+message);
    }
}
